<template>
  <div class="shangp">
    <van-goods-action>
      <van-goods-action-icon
        icon="chat-o"
        text="客服"
        color="#ee0a24"
      />
      <van-goods-action-icon
        icon="cart-o"
        text="购物车"
      />
      <van-goods-action-icon
        icon="star"
        text="已收藏"
        color="#ff5000"
      />
      <van-goods-action-button
        type="warning"
        text="加入购物车"
      />
      <van-goods-action-button
        type="danger"
        text="立即购买"
      />
    </van-goods-action>
  </div>
</template>
<script>
import axios from "axios"
export default {
  props: ["id"],
  data() {
    return {
      token: localStorage.token
    }
  },
  methods: {
    async add(authoriZation) {
      console.log(authoriZation);
      await axios.post(`https://api.java.crmeb.net/api/front/cart/num`, {
        Headers: {
          "authori-zation": authoriZation
        }
      }).then(res => {
        console.log(res);
      })

    }
  }
  , created() {
    this.add(this.token)
  }
}
</script>
<style lang="scss" scoped>
.shangp {
  z-index: 1999;
}
</style>